############
# My strategy is to establish a reputation of about 20% for the first 5 rounds, by only hunting with the top 20% of reputations.
# After the first 5 rounds, I will only hunt with those whose rep >= mine.
############

def hunt_choices(round_number, current_food, current_reputation, m,  player_reputations):
	
	numPlayers = len(player_reputations)
	allPHunt = sum(player_reputations)/float(numPlayers)  #average of player_reputations
	
	hunt_decisions = list()
	
#Get an array of the indexes of the best reputations
	thresholdPct = 0.20  #top % reps to get
	threshold = int(round(thresholdPct * numPlayers))
	bestReps = sorted(range(len(player_reputations)), key=lambda i: player_reputations[i], reverse=True)[:threshold]
	#print bestReps
	
#loop through players
	for idx, this_rep in enumerate(player_reputations):
		
		my_decision = "s"
		if round_number < 5:
			#if this person is in the array of best reps, hunt
			if idx in bestReps:
				my_decision = "h"
		elif this_rep >= current_reputation:
			my_decision = "h"
		
		hunt_decisions.append(my_decision)

	return hunt_decisions

def hunt_outcomes(food_earnings):
  
    pass 

def round_end(award, m, number_hunters):

    pass
	